-- GENERATED SPELL FOR [Grimtotem Elder] --


function spell0_23714(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_23714', 3000, 1)
end

function spell1_23714(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23714', 3000, 1)
end

function Sorts_23714(pUnit, Event)
local choix_sorts_23714 = math.random(0, 1)
if choix_sorts_23714 == 0 then
pUnit:RegisterEvent('spell0_23714', 1, 1)
end
if choix_sorts_23714 == 1 then
pUnit:RegisterEvent('spell1_23714', 1, 1)
end
end

function mob23714_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23714', math.random(1500, 3000), 1)
end

function mob23714_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23714_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23714_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23714, 1, 'mob23714_Action')
RegisterUnitEvent(23714, 2, 'mob23714_Leave')
RegisterUnitEvent(23714, 3, 'mob23714_Kill')
RegisterUnitEvent(23714, 4, 'mob23714_Die')
